xend: Fix tapdisk creation for managed domains
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 23 Jun 2009 10:20:10 +0000 (11:20 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 23 Jun 2009 10:20:10 +0000 (11:20 +0100)
The first start of a managed domain succeeds.  But the second
start of the managed domain fails as follows.  The problem occurs
when tapdisks are given to the managed domain.  I think that the
problem occurs because the uname of tapdisks is overwritten with
"phy:/dev/xen/tadisk-2/tapdev*".

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/server/BlktapController.py

index 8b718deb3a689c7df60aea38d76bb404b2384040..a9c9c4d53a17a3a39db1c0525f2c0dfb4535b56c 100644 (file)
@@ -1360,6 +1360,7 @@ class XendConfig(dict):
                 if dev_info['uname'].split(':')[1] not in blktap_disk_types:
                     raise XendConfigError("tap:%s not a valid disk type" %
                                     dev_info['uname'].split(':')[1])
+                dev_info['required_uname'] = dev_info['uname']
 
             if dev_type == 'vif':
                 if not dev_info.get('mac'):
index 2e6c93a896de4d64e683df6ae863f3a0f614aa98..a5c040fc452953776fdd08fae88fb778defdfc0d 100644 (file)
@@ -120,7 +120,7 @@ class BlktapController(BlkifController):
 
     def createDevice(self, config):
 
-        uname = config.get('uname', '')
+        uname = config.get('required_uname', '')
         try:
             (typ, subtyp, params, file) = string.split(uname, ':', 3)
         except: